<!doctype html>
<html ng-app="form-example1">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link href="media/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <script src="media/js/angular.min.js"></script>
    <script src="FormValidation.js"></script>
</head>
<body>
<div>
    <form name="myForm" class="css-form" novalidate>
        <div>
            整数(0-10):
            <input type="number" ng-model="size" name="size" min="0" max="10" integer/>
            {{size}}
            <br/>
            <span ng-show="myForm.size.$error.integer">不是合法的整数！</span>
                    <span ng-show="myForm.size.$error.min || myForm.size.$error.max">
                        数值必须位于0到10之间！
                    </span>
        </div>
        <div>
            整数(0-10):
            <input type="number" ng-model="size1" name="size1" min="0" max="10" integer/>
            {{size1}}
            <br/>
            <span ng-show="myForm.size1.$error.integer">不是合法的整数1！</span>
                    <span ng-show="myForm.size1.$error.min || myForm.size1.$error.max">
                        数值必须位于0到10之间！
                    </span>
        </div>
        <div>
            浮点数:
            <input type="text" ng-model="length" name="length" smart-float />
            {{length}}
            <br/>
            <span ng-show="myForm.length.$error.float">不是合法的浮点数！</span>
        </div>
        <div>
            远程校验:
            <input type="text" ng-model="remote" name="remote" remote-validation />
            {{remote}}
            <br/>
            <span ng-show="myForm.remote.$error.remote">非法数据！</span>
        </div>
    </form>
</div>
</body>
</html>